<template>
  <!--鼠标滚轮控制-->
  <div class="plum">
    <el-container>
      <el-header>logo</el-header>
      <el-container>
        <el-aside width="200px">侧边栏</el-aside>
        <el-container>
          <el-main @mousewheel.prevent="rollImg">
            <div ref="imgDiv">
              <el-table height="500px">
                <el-table-column label="序号" width="60px"></el-table-column>
                <el-table-column label="名称" width="60px"></el-table-column>
                <el-table-column label="ip" width="60px"></el-table-column>
                <el-table-column label="cpu" width="60px"></el-table-column>
                <el-table-column label="详情" width="60px"></el-table-column>
                <el-table-column label="系统"></el-table-column>
              </el-table>
            </div>
          </el-main>
        </el-container>
      </el-container>
    </el-container>
  </div>
</template>
<script setup>
import { ref, onMounted } from "vue";
const imgDiv = ref(null);
const rollImg = () => {
  let zoom = parseInt(imgDiv.value.style.zoom) || 100;
  zoom += event.wheelDelta / 12;
  if (zoom >= 20 && zoom < 300) {
    imgDiv.value.style.zoom = zoom + "%";
  }
  return false;
};
</script>
<style lang="scss" scoped>
.plum {
  width: 100%;
  height: 100%;
  display: flex;
}
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}
.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}
.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}
body > .el-container {
  margin-bottom: 40px;
}
.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}
.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>
